import request from '@/utils/request'

// 查询配方管理列表
export function listRecipe(query) {
  return request({
    url: '/system/recipe/list',
    method: 'get',
    params: query
  })
}

// 查询配方管理详细
export function getRecipe(recipeId) {
  return request({
    url: '/system/recipe/' + recipeId,
    method: 'get'
  })
}

// 新增配方管理
export function addRecipe(data) {
  return request({
    url: '/system/recipe',
    method: 'post',
    data: data
  })
}

// 修改配方管理
export function updateRecipe(data) {
  return request({
    url: '/system/recipe',
    method: 'put',
    data: data
  })
}

// 删除配方管理
export function delRecipe(recipeId) {
  return request({
    url: '/system/recipe/' + recipeId,
    method: 'delete'
  })
}
